package com.cmc.cloud.cmclink.doc.api.document.req.soamendapplyvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 订舱修改申请审批表主 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class SoAmendApplyBaseVO {

    @Schema(description = "修改申请号 订单号11位+SO+yy+mm+dd+hh4+mi+ss", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{soamendapply.soamendapplyno.notblank}")
    @Length(max = 30, message = "{soamendapply.soamendapplyno.length}")
    private String soAmendApplyNo;

    @Schema(description = "申请记录状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "{soamendapply.soamendstatus.notblank}")
    @Length(max = 30, message = "{soamendapply.soamendstatus.length}")
    private String soAmendStatus;

    @Schema(description = "修改id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31863")
    @NotNull(message = "{soamendapply.soid.notnull}")
    private Long soId;

    @Schema(description = "订舱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{soamendapply.bookingno.notblank}")
    @Length(max = 20, message = "{soamendapply.bookingno.length}")
    private String bookingNo;

    @Schema(description = "申请人", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{soamendapply.applyuser.notblank}")
    @Length(max = 64, message = "{soamendapply.applyuser.length}")
    private String applyUser;

    @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{soamendapply.applytime.notnull}")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime applyTime;

    @Schema(description = "审批人")
    @Length(max = 64, message = "{soamendapply.approveuser.length}")
    private String approveUser;

    @Schema(description = "审批时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime approveTime;

    @Schema(description = "申请理由", requiredMode = Schema.RequiredMode.REQUIRED, example = "不香")
    @Length(max = 255, message = "{soamendapply.applyreason.length}")
    private String applyReason;

    @Schema(description = "操作类型【数据字典COMBINE ", example = "1")
    private String operatianType;
}
